A collection of information about Data Augmentation libraries for Image Processing.

Augraphy

last updated on 10/10/2023

Supported languages:
  • Python (3.7, 3.8, 3.9, 3.10)
Transformations Description Tags
1.

Adds noise to generate an effect of dirty copier.

PAPERDOCS NOISE
Original Augmented
Original Augmented
transform = BadPhotoCopy(mask=None, noise_type=-1, noise_side='random',
                         noise_iteration=(2, 5), noise_size=(1, 3),
                         noise_value=(0, 64), noise_sparsity=(0.1, 0.9),
                         noise_concentration=(0.1, 0.6), blur_noise=-1,
                         blur_noise_kernel=(5, 5), wave_pattern=-1,
                         edge_effect=-1, p=1)
2.

Creates binding and fastener mark in the input image.

PAPERDOCS
Original Augmented
Original Augmented
transform = BindingsAndFasteners(overlay_types='random', foreground=None,
                                 effect_type='random', ntimes=(2, 6),
                                 nscales=(1.0, 1.5), edge='random',
                                 edge_offset=(5, 20), use_figshare_library=0,
                                 p=1)
3.

Emulates bleed through effect from the combination of ink bleed and gaussian blur operations.

PAPERDOCS
Original Augmented
Original Augmented
transform = BleedThrough(intensity_range=(0.1, 0.9), color_range=(0, 224),
                         ksize=(17, 17), sigmaX=1, alpha=0.2,
                         offsets=(20, 20), p=1)
4.

Creates a book binding effect with shadow and curved lines.

PAPERDOCS
Original Augmented
transform = BookBinding(radius_range=(1, 100), curve_range=(200, 300),
                        mirror_range=(0.2, 0.5), curling_direction=1, p=1)
5.

Adjusts the brightness of the whole image by a chosen multiplier.

PHOTOMETRY
Original Augmented
transform = Brightness(brightness_range=(0.8, 1.4), min_brightness=0,
                       min_brightness_value=(120, 150), p=1)
6.

Creates a random noise in the brightness channel to emulate paper textures.

NOISE PAPERDOCS PHOTOMETRY
Original Augmented
transform = BrightnessTexturize(texturize_range=(0.9, 0.99),
                                deviation=0.03, p=1)
7.

Change color of input paper based on user input hue and saturation.

PAPERDOCS
Original Augmented
transform = ColorPaper(hue_range=(120, 150), saturation_range=(60, 100), p=1)

# in OpenCV, H value is in range [0, 180]
# 0 red, 30 yellow, 60 green, 90 cyan, 120 blue, 150 magenta, 180 red
Original Augmented
transform = ColorPaper(hue_range=(0, 180), saturation_range=(0, 100), p=1)
8.

Shifts each BGR color channel by certain offsets.

9.

Applies a Delaunay Tessellation.

10.

Emulates dirty drum effect by creating stripes of vertical and horizontal noises.

PAPERDOCS
Original Augmented
Original Augmented
transform = DirtyDrum(line_width_range=(1, 4), line_concentration=0.1,
            direction=2, noise_intensity=0.5, noise_value=(0, 30),
            ksize=(3, 3), sigmaX=0, p=1)
11.

Emulates an effect created by certain document scanners.

PAPERDOCS
Original Augmented
Original Augmented
transform = DirtyRollers(line_width_range=(8, 12), scanline_type=0, p=1)
12.

Applies Ordered or Floyd Steinberg dithering to the input image.

Original Augmented
transform = Dithering(dither='ordered', order=2, p=1)
Original Augmented
transform = Dithering(dither='ordered', order=8, p=1)
Original Augmented
transform = Dithering(dither='floyd', p=1)
Original Augmented
transform = Dithering(dither='ordered', order=2, p=1)
13.

Creates dot matrix effect by drawing dots of mean color within the detected contours.

14.

Emulates faxify effect in the image.

PAPERDOCS
Original Augmented
transform = Faxify(scale_range=(1.0, 1.25), monochrome=1,
                   monochrome_method='random', monochrome_arguments={},
                   halftone=1, invert=1, half_kernel_size=(1, 1),
                   angle=(0, 360), sigma=(1, 3), p=1)
15.

Emulates folding effect from perspective transformation.

PAPERDOCS
Original Augmented
transform = Folding(fold_x=None, fold_deviation=(0, 0), fold_count=2,
                    fold_noise=0.1, gradient_width=(0.1, 0.2),
                    gradient_height=(0.01, 0.02), p=1)
16.

Adjusts the gamma of the whole image by a chosen multiplier.

PHOTOMETRY
Original Augmented
transform = Gamma(gamma_range=(0.1, 0.2), p=1)
Original Augmented
transform = Gamma(gamma_range=(2.0, 2.1), p=1)
17.

Applies basic geometric transformations such as resizing, flips and rotation.

BASIC GEOMETRY
Original Augmented
# horizontal flip
transform = Geometric(scale=(1, 1), translation=(0, 0), fliplr=1,
                      flipud=0, crop=(), rotate_range=(0, 0), p=1)
Original Augmented
# translation
transform = Geometric(scale=(1, 1), translation=(100, -50), fliplr=0,
                      flipud=0, crop=(), rotate_range=(0, 0), p=1)
Original Augmented
# crop
transform = Geometric(scale=(1, 1), translation=(0, 0), fliplr=0,
                      flipud=0, crop=(0, 0, 1910, 500), rotate_range=(0, 0), p=1)
Original Augmented
# scaling
transform = Geometric(scale=(0.2, 0.2), translation=(0, 0), fliplr=0,
                      flipud=0, crop=(), rotate_range=(0, 0), p=1)
Original Augmented
# rotation
transform = Geometric(scale=(1,1), translation=(0,0), fliplr=0,
                      flipud=0, crop=(), rotate_range=(180, 180), p=1)
18.

Generates a glitch effect by applying ColorShift and moving sections of the image either horizontally or vertically.

19.

Generates a hollow impression by substituting identified outlines with edges. The identified outlines are eliminated through the application of a median filter operation.

PAPERDOCS
20.

Uses Sobel edge detection to create a mask of all edges, then applies random noise to those edges. When followed by a blur, this creates a fuzzy edge that emulates an ink bleed effect.

PAPERDOCS
Original Augmented
transform = InkBleed(intensity_range=(1, 1), color_range=(0, 0),
                     kernel_size=(5, 5), severity=(1, 1), p=1)
Original Augmented
transform = InkBleed(intensity_range=(1, 1), color_range=(0, 128),
                     kernel_size=(5, 5), severity=(1, 1), p=1)
Original Augmented
transform = InkBleed(intensity_range=(0.5, 0.5), color_range=(0, 128),
                     kernel_size=(5, 5), severity=(1, 1), p=1)
21.

Swaps color of ink in the image based on detected ink contours.

PAPERDOCS
22.

Creates a random pattern effect in the detected ink by blending a layer of random Gaussian noise with the image.

PAPERDOCS
23.

Applies displacement map to an image.

PAPERDOCS DISTORTION
24.

Uses JPEG encoding to create compression artifacts in the image.

WORSENING
Original Augmented
transform = Jpeg(quality_range=(1, 1), p=1)
25.

Produces regions of ink mimicking the effect of ink pressed unevenly onto paper.

PAPERDOCS
Original Augmented
transform = Letterpress(n_samples=(300, 800), n_clusters=(300, 800),
                        std_range=(1500, 5000), value_range=(200, 255),
                        value_threshold_range=(128, 128), blur=1, p=1)
26.

Generates a decayed light mask generated by light strip given its position and direction, and applies it to the image as a lighting or brightness gradient.

Original Augmented
transform = LightingGradient(light_position=None, direction=None,
                             max_brightness=255, min_brightness=0,
                             mode='gaussian', linear_decay_rate=None,
                             transparency=None, p=1)
27.

Degrades lines by replacing lines formed by image gradients with a different value.

PAPERDOCS
28.

Creates a set of lines that repeat in a periodic fashion throughout the image.

PAPERDOCS
Original Augmented
transform = LowInkPeriodicLines(count_range=(2, 5), period_range=(10, 30),
                                use_consistent_lines=True,
                                noise_probability=0.1, p=1)
29.

Adds low ink lines randomly throughout the image.

PAPERDOCS
Original Augmented
transform = LowInkRandomLines(count_range=(30, 50),
                              use_consistent_lines=True,
                              noise_probability=0.1, p=1)
30.

Simulate low-light conditions in an image by applying various noise effects.

31.

Uses contours detection to detect text lines and add a smooth text strikethrough, highlight or underline effect.

PAPERDOCS
Original Augmented
transform = Markup(num_lines_range=(2, 7), markup_length_range=(0.5, 1),
                   markup_thickness_range=(1, 3),
                   markup_type='strikethrough', markup_color='random',
                   large_word_mode=True, single_word_mode=False,
                   repetitions=1, p=1)
Original Augmented
transform = Markup(num_lines_range=(2, 7), markup_length_range=(0.5, 1),
                   markup_thickness_range=(1, 3),
                   markup_type='strikethrough', markup_color='random',
                   large_word_mode=True, single_word_mode=False,
                   repetitions=3, p=1)
Original Augmented
transform = Markup(num_lines_range=(2, 7), markup_length_range=(0.5, 1),
                   markup_thickness_range=(1, 3),
                   markup_type='highlight', markup_color=(255, 255, 0),
                   large_word_mode=True, single_word_mode=False,
                   repetitions=3, p=1)
32.

Creates a random noise based texture pattern to emulate paper textures. Consequently applies noise patterns to the original image from big to small.

NOISE
Original Augmented
transform = NoiseTexturize(sigma_range=(3, 10), turbulence_range=(2, 5),
                           p=1)
Original Augmented
transform = NoiseTexturize(sigma_range=(12, 15), turbulence_range=(2, 5),
                           p=1)
33.

Creates noisy lines by drawing horizontal or vertical lines in a fixed interval.

PAPERDOCS
34.

Add border effect to sides of input image.

PAPERDOCS
Original Augmented
transform = PageBorder(side='random', border_background_value=(230, 255),
                       flip_border=0, width_range=(30, 60),
                       pages=None, noise_intensity_range=(0.3, 0.8),
                       curve_frequency=(2, 8), curve_height=(2, 4),
                       curve_length_one_side=(50, 100), value=(30, 120),
                       same_page_border=1, p=1)
35.

Creates and overlays a pattern on the image.

PAPERDOCS
36.

Creates reflected light effect by drawing ellipses of different brightness.

PAPERDOCS
37.

Applies random scribbles to image.

PAPERDOCS
Original Augmented
transform = PencilScribbles(size_range=(250, 400), count_range=(1, 10),
                            stroke_count_range=(1, 6),
                            thickness_range=(2, 6), brightness_change=128,
                            p=1)
38.

Shifts single or multiple sections of image in horizontal, vertical or both directions to create an effect of shifted image sections.

PAPERDOCS
39.

Emulates shadow effect on the surface of the paper.

PAPERDOCS
40.

Creates a squish effect by removing a fixed horizontal or vertical section of the image.

PAPERDOCS
41.

Emulates the imperfections in scanning solid colors due to subtle lighting differences.

NOISE
Original Augmented
transform = SubtleNoise(subtle_range=40, p=1)
42.

Add watermark effect into input image.

PAPERDOCS
Original Augmented
transform = WaterMark(watermark_word='random', watermark_font_size=(10, 15),
                      watermark_font_thickness=(20, 25),
                      watermark_font_type=0, watermark_rotation=(0, 360),
                      watermark_location='random', watermark_color='random',
                      watermark_method='darken', p=1)